Conversation
AA-Turner
reviewed
Nov 26, 2025
Member
AA-Turner
left a comment
There was a problem hiding this comment.
If it were me, I'd probably duplicate the jobs -- one for released & one for in-development.
ezio-melotti
approved these changes
Nov 28, 2025
Comment on lines
+16
to
+18
| include: | ||
| - python-version: "3.15" | ||
| branch: "main" |
Member
There was a problem hiding this comment.
A possible improvement is to compute the branch and extra opts once and assign them to env vars:
Suggested change
| include: | |
| - python-version: "3.15" | |
| branch: "main" | |
| include: | |
| - python-version: "3.15" | |
| branch: "main" | |
| extra_opts: '--select-output no-html' | |
| env: | |
| # set the branch name to either 'main' or the version number | |
| BRANCH: ${{ matrix.branch || matrix.version }} | |
| # define optional extra options if specified | |
| EXTRA_OPTS: ${{ matrix.extra_opts || '' }} |
This keeps all the data and logic closer and avoids duplication. However we only need the branch and the extra opts once in the workflow, so your less-verbose solution is fine too.
Member
Author
There was a problem hiding this comment.
Yeah, that is quite a bit more verbose, let's stick with the current version. Thanks!
Comment on lines
+44
to
+45
| --branches ${{ matrix.branch || matrix.python-version }} | ||
| ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} |
Member
There was a problem hiding this comment.
Suggested change
| --branches ${{ matrix.branch || matrix.python-version }} | |
| ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} | |
| --branches env.BRANCH env.EXTRA_OPTS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The earlier approach was something like:
Which do you prefer?
📚 Documentation preview 📚: https://python-docs-theme-previews--282.org.readthedocs.build/